﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Text;
using System.Collections.Generic;
using System.ComponentModel;

namespace MobileManager.UserControl
{
    public partial class ProvinceListQuick : System.Web.UI.UserControl
    {
        [BrowsableAttribute(true)]
        [DescriptionAttribute("TextValue")]
        [DefaultValueAttribute("")]
        public string TextValue
        {
            get
            {
                return txtKey.Text;
            }
            set
            {
                txtKey.Text = value;
            }
        }

        [BrowsableAttribute(true)]
        [DescriptionAttribute("Enabled")]
        [DefaultValueAttribute("")]
        public bool Enabled
        {
            set
            {
                txtKey.Enabled = value;
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {

        }
        /// <summary>
        /// 取得下拉列表信息
        /// </summary>
        /// <returns></returns>
        public string GetDropDownInfo()
        {
            StringBuilder sbInfo = new StringBuilder(1000);
            foreach (MM.DBUtility.ProvinceInfo Pitem in MM.DBUtility.BLSqlData.AllProvince)
            {
                sbInfo.Append(string.Format("{0},", Pitem.PinYinCode + " " + Pitem.ProvinceName));
            }
            if (sbInfo.Length != 0)
            {
                sbInfo = sbInfo.Remove(sbInfo.Length - 1, 1);
            }
            return sbInfo.ToString();
        }
    }
}